Victron: add grid-setpoint battery hold control (#31099)#31299
Conversation
|
Is this only relevant for hold discharge mode or also the other modes? (Hold charge, force charge) |
|
We could use the same method for each of them. The tricky part is that a Victron system typically operates based on a grid setpoint unless you put it in very low level control mode. So the concept of hold charge/discharge is not that easy to implement. This method does it by increasing the grid setpoint by the amount of power being used for charging. A force charge in Victron terms means setting the grid setpoint to for example 5 kW import, and then the battery charges with 5 kW minus the household usage. |
|
I've also thought about how to control the battery modes via the grid-setpoint, since I don't think the current implementation is ideal either. I've already tested the battery modes using grid-setpoint, by manually writing to the registers via ModbusPoll, and I can share my observations and findings here in case that might be helpful. I think for implementing batterymodes such as hold charge oder hold discharge, other registers that activate/deactivate the inverter or charger might be the way to go. Controlling this via the grid-setpoint seems to me to be a very complicated solution? Regarding Force Charge: If the grid setpoint is set high enough, the charger will either charge the battery at its maximum power or the charge will be limited by the maximum charge current set via the DVCC-settings. The same would apply to the “Force Discharge” mode (should it ever become relevant). The only difference is that in this case, the inverter power can be limited in the UI. I think these two settings - maximum inverter power and maximum charging current—should definitely be taken into account by the battery modes. |
|
Yes let's compare notes. I had looked into limiting inverter power (and similar registers for limiting charge power), however these seem to have other side-effects. For example inverter power could also effect functionality like peak-shaving. And changing DVCC charge current is only half the equation because that number includes current from the MPPT as well so you would have do calculate a continuously changing target number to be able to use it to control the amount of AC power the inverters take. The grid setpoint is listed in the Victron documentation as usable for "mode 2" control which will leave all other settings alone and respect all limits. There is also "mode 3" which allows you to do whatever you want, but then you're responsible for managing limits. In mode 2, if you set the grid setpoint +20000 or -20000 or something the system will take that as a request to charge or discharge at the maximum rate. That maximum depends on inverter capability (and temperature), it automatically takes BMS signals from the batteries about maximum charge/discharge into account and adjusts for any PV input via the MPPT. So it's a very managed mode. |
|
I also tested Mode 3, but I quickly came to the conclusion that it would be even more complicated, especially if it's supposed to work with a wide variety of Victron systems. So i guess mode 2 is fine. I will have a look at my notes in the evening and we can check again. |
|
Thanks! My observations for 2716 are the same as yours. And writing 0 back into it means the device will start to do whatever the user has set in 2700 via the UI, so that is a safe way to return it to normal. That is better than writing the value of 2700 into 2716, because doing so looks like it would override a later change by the user (via the Victron UI). Unfortunately 2701 and 2702 both are deprecated and documented by Victron here https://www.victronenergy.com/live/ess:ess_mode_2_and_3 as "This setting is deprecated and only works when DVCC is disabled." so we cannot use those. I'm not a fan of changing 2705 dynamically from EVCC. That setting is part of the Charge Control screen with a "Caution: Read the manual before adjusting" label. It needs to be set to a safe value for the batteries, fuses and cables. It's also in amps, so we would need to consider the battery voltage (not all are 48V systems). |
|
So our solutions to force charge via Register 2716 are the same. That’s a first success, i think. I'm quite familiar with Victron's description of the ESS modes, but I couldn't come up with any other solution for implementing the Hold Discharge or Hold Charge mode. For Hold Discharge we could also use 2704 instead of 2702 to disable the inverter, but then a inverter-power-limit has to be configured in the evcc-template? Thats why i tried to use Reg 2702. I know its deprecated, but it does still work and has the advantage that we dont override user-settings in the Victron-UI and an additional config-value in evcc is also not necessary. I totally agree with you that disabling the charger via the Register 2701 or 2705 is not a very elegant solution, but as described above, im not sure how to do it in a better way. But for BMS-controlled ESS-Systems this charge current limitation is not a must have, because the bms of the battery does already limit its charge current. As I understand it right, it is intended solely to protect batteries that are not managed by a BMS, rather than to protect cables or fuses against overload. That is part of a proper electrical installation. I also considered for Hold Charge-mode to use ESS-Mode 3 and disable the charger, but in this case a user defined inverter-power limit would not be considered if a DC-coupled pv-power is fed into the grid. |
|
Agree, there is not really a clean way to do Hold Charge and Hold Discharge with the options that Victron offers if you want to stay in mode 2 (which I think we do, because mode 3 also looses other protections). We could use 2704 to do a "Don't Discharge" mode by setting it to 0, it may be better than doing the current minSOC = SOC (which breaks DESS, see #31299). However I expect that it will break Peak Shaving. That is tricky because Peak Shaving is a feature you would mostly use when the EV is charging, which is exactly when EVCC would want to use a "Don't discharge" mode. So these considerations is how I got to the approach of writing current EV charge power into 2716. Then all other features keep working and the battery essentially ignores the EV charger while still charging from solar and discharging for household loads. |
|
As i unterstand peak shaving correctly, but that sounds like a contradiction to me. Either I want the home battery not to discharge during an ev-charging process, drawing energy from the grid instead. Or I want to limit the power drawn from the grid by using the battery for support. You can't do both during an EV-charging session. And the second question is, does peak shaving work with the current minSOC = SOC solution? And in addition, there is also the load management feature, that could take on this task. |
|
It does work with minSOC = SOC. Typically peak shaving uses only small amounts of total energy discharged but in short bursts with high peak powers. So the overall cost in kWh is very low, but disabling it can cause issues. I need to find a moment to test the exact interaction between limiting inverter power via modbus and the peak shaving logic. I expect at that it will still reduce charging power if it was charging at the time of the overload. And I expect it won't discharge above the inverter power limit. At least that's how I read the Victron docs. |

See issue #31099. The minimum-SOC based approach conflicts with Victron DESS. This adds an optional approach to adjust the battery setpoint by the current EVCC charging power so the battery ignores it.